/**
 * Created by Generator on 2017/08/03
 */
package com.nmgmd.shequ.hospital.base;

import com.nmghr.base.jpa.EnableBaseJpa;
import com.nmghr.manager.boot.EnableHrManager;
import com.nmghr.manager.rbac.service.SchemaTableService;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
@EnableBaseJpa
@EnableHrManager
public class MdSheQuHospitalBaseApplication {
    public static void main(String[] args) {
        SpringApplication.run(MdSheQuHospitalBaseApplication.class, args);
    }
    @Bean
    public InitializingBean initializingBean() {
        return new InitializingBean() {
            @Autowired
            SchemaTableService schemaTableService;

            public void afterPropertiesSet() throws Exception {
                schemaTableService.initSchemaTableWithColumns();
            }
        };
    }
}